// sql语句
var sql = {
    // 用户
    user: {
        login: 'select * from admin_user where userName = ? and passWord = ?',
        queryUserList: 'select * from user',
        createUser: 'INSERT INTO user (userId, userName, createDate, nickName, passWord) VALUES (?,?,?,?,?)'
    },
    article: {
        query: 'select * from article',
        queryById: 'select * from article where discuss_id = ?',
        create: 'INSERT INTO article (title, content, keyword, type_id, type_name) VALUES (?,?,?,?,?)',
        delete: 'delete from article where discuss_id = ?',
        update: 'update article set title=?,content=?,keyword=? where discuss_id = ?',
        queryArticleType: 'select * from article_type',
        createArticleType: 'INSERT INTO article_type (typeId, typeName, createDate) VALUES (?,?,?)',
        queryArticleTypeById: 'select * from article_type where typeId = ?'
    }
}
    
module.exports = sql;